Skip to content

zibetnu/godot-git-describe

Repository files navigation

Godot Git Describe

Godot v4.2+ License Latest Release

Linux Steam Linux Runtime Windows

Do you use tags to label your project's releases? Do you want to display those labels in your project without manually setting a separate value?

You've come to the right place.

Features

  • Adds your Git repository's description to your project on run or export.
  • Reverts changes when you stop your project or an export is finished.
  • Batteries included: comes with nodes and settings that cover common use cases.

Installation

  1. Use Godot to download GGD from the Asset Library (recommended) or get the latest GitHub release.
  2. Enable GGD in the project settings.

See the Godot docs for detailed instructions if needed.

Note

GGD uses Godot 4.4's UID system. Godot 4.3 and earlier will adjust the UIDs after printing a warning on the first run.

Usage

  1. Add a tag to your Git repo.
  2. Add included nodes and adjust project settings as desired.
  3. Run or export the project.

Tip

For best results, do not commit automatic changes to version control.

Nodes

Name Description
ProjectSettingLabel A label for displaying the value of a project setting. Base class for the other labels.
GitDescribeLabel A label that automatically displays the Git describe string.
GitHashLabel A label that automatically displays the latest Git commit hash.

Settings

GGD's project settings are found under the setting path addons/git_describe.

Name Description Default Value
Append Describe to Project Name If true, GGD appends the describe string to your project's name on run or export. false
Describe Setting Path Path of the setting that GGD sets to the describe string on run or export. "application/config/git_describe"
Command Options[1] Options that GGD passes to the describe command. See the Git docs for available options. "--always --tags"
User Extensions Dir[1] Directory that GGD searches for user-made extensions to load on startup. Allows presence of unrelated files. ""

[1]: Advanced setting; only shown when the "Advanced Settings" option is enabled.

Extensions

Extensions add new features for GGD to use when you run or export your project. GGD uses extensions internally, which are a helpful reference when making your own.

To create and enable an extension:

  1. Create a script that extends GitDescribeExtension.
  2. Override _init with any setup your extension needs.
  3. Override _set_describe to make changes with the describe string.
  4. Override _erase_describe to undo the changes made by _set_describe.
  5. Set the "User Extensions Dir" project setting to the directory that contains your extension.
  6. Reload the project.

Contributing

Contributions are welcome. Please follow these guidelines:

About

Seamlessly display in-game versions based on your Git tags.

Resources

License

Stars

Watchers

Forks